Texture mapping in a graphics processing unit (GPU) is responsible for adding detail to a computer generated graphics model. The process involves fetching actual color values and filtering them to produce the color for every pixel in the model. Texturing is a critical design component for 3D rendering performance and incurs a significant fraction of total processor power. In typical GPUs, the color values are fetched from memory before further filtering. Memory access due to texturing contributes to memory bandwidth and memory power and is a major source of performance bottlenecks. Reducing or eliminating memory accesses due to texturing is an important GPU design constraint.
Texture bandwidth contributes a major fraction of total memory bandwidth. It is a common industry practice to perform offline fixed rate compression of texture data to reduce memory bandwidth requirements. Compression is typically performed on blocks of data, where a block is a region of M×N pixels or texels. Square regions (M×M) are typically chosen for blocks because of cache locality and access pattern considerations.
The most popular compression algorithms belong to the category of fixed rate and fixed address lossy compression. In a graphics system, fixed rate compression schemes compress fixed size blocks of data, such as 4×4 blocks of pixels, into a fixed length of L bits, regardless of the frequency content of the blocks. Consequently, fixed rate compression schemes are inherently lossy because blocks with high frequency content cannot be compressed without loss into the fixed size. However, an advantage of fixed rate compression is that it permits a simple addressing scheme using fixed addresses. The fixed addresses, in turn, permits a straight forward addressing scheme during decompression, making it easy to perform decompression using efficient hardware based addressing schemes.
Examples of common compression standards used in the graphics field with fixed rate and fixed addressing include the DXT, ETC, and ASTC compression standards. In these compression standards, a texture image is broken into multiple M×N or M×M blocks, where M and N are positive integers. As one example, 4×4 blocks are very popular and employed in all DXT and ETC standards. Each of the 4×4 blocks of data are compressed to a fixed length, such as 8B or 16B. For example, for a fixed length of 8B, a 64×64 texture is broken down into 256 4×4 blocks and each of the 4×4 blocks are compressed down to a fixed size of 8 Bytes. ASTC allows for a choice of various blocks sizes from 4×4 to 12×12 as a global per texture choice. However, once a block size is chosen, it remains the same across the whole texture.
However, the evolution in fixed rate compression algorithms is entering an era of diminishing returns and suffers from various problems. One problem is that there are situations in which the fixed rate algorithms are inefficient. For example, if there are duplicate blocks, each block is separately compressed. If there are identical blocks with high frequency information at two ends of a texture, each of the identical blocks must be compressed into separate duplicate blocks. As a result, the standard fixed rate compression algorithms can be extremely inefficient for situations in which a texture has many duplicate blocks and in redundant high frequency content blocks.
Another problem is that there are applications in which conventional fixed rate lossy compression in unacceptable. Fixed rate compression is typically used for static textures, which are compressed offline. However, this does not address some of the issues faced in game applications when there are dynamic textures generated during run time. In particular, there are applications in which the GPU dynamically generates color data and lossy compression (color data precision loss) in unacceptable under current GPU API standards like Open GL® or GL ES®. Even if lossy compression is acceptable, conventional fixed rate compression is time intensive and thus cannot be applied to dynamically generated textures.